package cn.com.springsource.dao.handler;

import cn.com.springsource.dao.handler.CustomerInvocationHandler;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class TestCustomerInvovationHandler implements CustomerInvocationHandler {

    Object target;

    public TestCustomerInvovationHandler(Object target) {
        this.target = target;
    }

    @Override
    public String invoke(Method method, Object[] args) throws Exception{
        try {
            return (String) method.invoke(target,args);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
        return null;
    }
}
